<!DOCTYPE html>
<html lang="zh-CN">
<head>
<#include "headImport.html">
<link rel='stylesheet' href='static/buysaas/css/index.css' type='text/css' media='screen' />
</head>
<body class="home blog">
	<div class="surface-container">
		<#include "headerNav.html">
		<#include "banner.html">
		<div class="u-backgroundWhiteLightest u-clearfix">
			<div class="y-maxWith1200">
				<div class="y-post-list u-clearfix y-paddingTop30">
					
				</div>
				
				<div class="y-maxWith1200" class="tag-type" data-type="yxgl">
					<div class="tag-type-link" style="height: 100%;">
						<div class="tag-type-title">
						热搜标签
<!-- 						<a href="saas.action?morePage&pageSize=1&contentType=">更多&gt;&gt;</a> -->
						</div>
						<div class="tag-type-show" style="height: 100%;"> 
							<ul>
								<#if tagList??>
								<#list tagList as tag>
								<li class="lh50">
									<a href="saas.action?morePage&pageSize=1&contentType=&tagName=${(tag.keyword)!}">${(tag.keyword)!}(${(tag.linkCount)!0})</a>
								</li>
								</#list>
								</#if>
							</ul>
						</div>
					</div>
				
					<div class="tag-type-content" >
						<div id="content-list">
							<#if items?? && (items?size gt 0)>
							<#list items as item>
							<#if item_index%4==0>
							<div class="wh <#if item_index!=0>mt53</#if>">
								<div class="tag-type-show-info ml40">
									<a target="_blank" href="saasContent.action?contentId=${(items[item_index].id)!}">
										<img class="small-img" alt="" src="${(items[item_index].smallPicPath)!}"
										width="200" height="130"> <span class="tag-type-desc">
											${(items[item_index].contentDesc)!} </span>
									</a>
								</div>
								
								<#if item_index+1 lt items?size>
								<div class="tag-type-show-info ml40">
									<a target="_blank" href="saasContent.action?contentId=${(items[item_index+1].id)!}">
										<img class="small-img" alt="" src="${(items[item_index+1].smallPicPath)!}"
										width="200" height="130"> <span class="tag-type-desc">
											${(items[item_index+1].contentDesc)!} </span>
									</a>
								</div>
								</#if>
								<#if item_index+2 lt items?size>
								<div class="tag-type-show-info ml40">
									<a target="_blank" href="saasContent.action?contentId=${(items[item_index+2].id)!}">
										<img class="small-img" alt="" src="${(items[item_index+2].smallPicPath)!}"
										width="200" height="130"> <span class="tag-type-desc">
											${(items[item_index+2].contentDesc)!} </span>
									</a>
								</div>
								</#if>
								<#if item_index+3 lt items?size>
								<div class="tag-type-show-info ml40">
									<a target="_blank" href="saasContent.action?contentId=${(items[item_index+3].id)!}">
										<img class="small-img" alt="" src="${(items[item_index+3].smallPicPath)!}"
										width="200" height="130"> <span class="tag-type-desc">
											${(items[item_index+3].contentDesc)!} </span>
									</a>
								</div>
								</#if>
								
							</div>
							</#if>
							</#list>
							<#else>
							<div class="ml40">暂无匹配SaaS相关软件，您可以点击立即咨询！</div>
							</#if>
						</div>
						
					</div>
				</div>
				
				<div class="y-post-list u-clearfix"></div>
			</div>

		</div>
		
		<#include "company.html">
		<#include "footer.html">
	</div>
	<#include "backTopImport.html">
	
	<script type="text/javascript">
		var pageNo = 1;
		$(document).ready(function(){
			$("#homeLoadMore").click(function(){
				$.post('saas.action?loadMore',{pageNo:++pageNo,type:'${type!}'},function(result){
// 		            console.log(result);
					if(!result.obj) {
						$('#homeLoadMore').hide();
						return;
					}
					var length = result.obj.length;
					if (length==0){
		            	 $('#homeLoadMore').hide();
		            } else {
		            	createList(result.obj);
		            	if(length<8) $('#homeLoadMore').hide();
		            }
		        },'json');
			});
		});
		function filterDesc(desc) {
			if(!desc) return "...";
			return desc;
		}
		function createList(items) {
			var html1 = '<div class="wh mt53">';
			var has1 = false;
			var html2 = '<div class="wh mt53">';
			var has2 = false;
			for (var i=0;i<items.length;i++)
			{
				if(i<=3) {
					html1 += '<div class="tag-type-show-info ml40"><a target="_blank" href="saasContent.action?contentId='+items[i].id+'">';
					html1 += '<img class="small-img" alt="" src="'+items[i].image+'" width="200" height="130"> <span class="tag-type-desc">';
					html1 += filterDesc(items[i].content)+'</span></a></div>';
					has1 = true;
				} else {
					html2 += '<div class="tag-type-show-info ml40"><a target="_blank" href="saasContent.action?contentId='+items[i].id+'">';
					html2 += '<img class="small-img" alt="" src="'+items[i].image+'" width="200" height="130"> <span class="tag-type-desc">';
					html2 += filterDesc(items[i].content)+'</span></a></div>';
					has2 = true;
				}	
			}
			html1 += '</div>';
			html2 += '</div>';
			if(has1) {
				$('#content-list').append(html1);
			}
			
			if(has2) {
				$('#content-list').append(html2);
			}
			
		}
		
	</script>
</body>
</html>